package day5;

public class Floater extends Employee{
    private int hours; // 工作小时

    public Floater(String name, String sex, String date, int hours) {
        super(name, sex, date);
        this.hours = hours;
    }

    public int getHours() {
        return hours;
    }

    public void setHours(int hours) {
        this.hours = hours;
    }

    //输出：临时工 王五 本月工资为 8400.0 元。
    public void computeSalary() {
        System.out.println("临时工 " + this.getName() + " 本月工资为 " + this.hours*50);
    }
}
